/*
 * @Author: yangzonglong
 * @Date: 2020-10-15 15:54:14
 * @version: v1.0.0
 * @Descripttion: 
 * @LastEditors: yangzonglong
 * @LastEditTime: 2020-11-19 13:12:14
 * @Auditor: 
 */

export const letterNumbersPattern = {
  pattern: new RegExp('^[a-zA-Z0-9]+$'),
  message: '只能输入字母或数字'
}

export const mailPattern = {
  pattern: new RegExp('^([a-zA-Z]|[0-9])(\\w|\\-)+@[a-zA-Z0-9]+\\.([a-zA-Z]{2,4})$'),
  message: '邮箱格式不正确'
}

export const phonePattern = {
  pattern: new RegExp('^1[3456789]\\d{9}$'),
  message: '手机格式不正确'
}

export const telPattern = {
  pattern: new RegExp('^(\\(\\d{3,4}\\)|\\d{3,4}-|\\s)?\\d{7,14}$'),
  message: '电话号码不正确'
}

export const idNumberPattern = {
  pattern: /^(\d{18}|\d{15}|\d{17}x)$/,
  message: '身份证号码不正确'
}